function [TrainSets TestSet] = createSets(InputSet, N)
% Function that creates N sets from our input set and returns them as columns in
% the return array sets. 
    %length of the new datasets
    setsLength = floor(size(InputSet, 1)/N);
    setsWidth = size(InputSet, 2);
    % Some data is lost when dividing into equal parts with the wrong N
    if(mod(size(InputSet, 1), N) ~= 0)
        printf('Warning, %d of the data points will be lost\n', mod(size(inputSet,1),N));
    end
    % the testSet is the first setsLength elements from the inputSet
    TestSet = InputSet(1:setsLength, :);
    TrainSets = ones(setsLength, setsWidth, N-1);
    for(i=1:N-1)
        % Create N-1 other training sets.
        TrainSets(:, :, i) = InputSet((i*setsLength+1):((i+1)*setsLength), :);
    end
end
